﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using WmsApp.WmsService;

namespace WmsApp.Service
{
    public class InvoiceBillService : IEntityService<InvoiceBill, InvoiceBillService>
    {

        #region IEntityService<InvoiceBill> Members

        public List<InvoiceBill> GetEntityList()
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            //没有条件查询结果为0条记录
            List<InvoiceBill> list = sc.GetInvoiceBillsByCondition(" and 1=2");
            foreach (var inStoreBill in list)
            {
                inStoreBill.BindPropertyChanged();
            }
            return list;
        }

        public List<InvoiceBill> GetEntityList(string condition)
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<InvoiceBill> list = sc.GetInvoiceBillsByCondition(condition);
            foreach (var invoiceBill in list)
            {
                invoiceBill.BindPropertyChanged();
            }
            return list;
        }

        public void SaveEntityList(List<InvoiceBill> list)
        {
            throw new NotImplementedException();
        }

        public InvoiceBill GetEntity(string key)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
